<template>
	<v-forms ref="formRef" :hide-footer="true">
		<template #tint1="scope">
			<el-Divider content-position="left" style="margin: 5px 0px"
				><span style="color: #1a63db; font-weight: bold">{{ scope.data.item.label }}</span></el-Divider
			>
		</template>
		<template #proProcess="scope">
			<div style="display: flex">
				<span style="width: 130px; font-size: 12px">{{ $t('mO2azQnoYwEi8PreIdr1y') }}</span><el-slider :min="0" :max="100" v-model="scope.data.formData[scope.data.item.key]" show-input size="small" :disabled="true" />
			</div>
		</template>
		<template #workHours="scope">
			<staff-action :scope="scope" :hiddenAction="true"></staff-action>
		</template>
		<template #theset_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('22Ec_7uPewlXxiy6I2C7')" size="default" />
		</template>
		<template #materialComing_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('vty87lnop0NkTt8dB8Eui')" size="default" />
		</template>
		<template #quality_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('v0N9LrWXy29Hi1jyz5Er')" size="default" />
		</template>
		<template #progressStatus_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('jRaEvVc0Fjr6p48dRFl7')" size="default" />
		</template>
		<template #security_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('gEteT_5laWmJeRtKjdqHu')" size="default" />
		</template>
		<template #customerComplaints_QU="scope">
			<el-checkbox disabled v-model="scope.data.formData[scope.data.item.key]" :label="$t('uqjEkwc7NiQgKJoKqKjik')" size="default" />
		</template>
		<template #contract>
			<div v-if="contractURL">
				<el-icon size="12">
					<ele-Link />
				</el-icon>
				<a :href="`${$host}${contractURL}`" style="color: blue; text-decoration: underline" target="_blank">{{ $t('2q60GtaOAtU0Jcx1vJmf') }}</a>
			</div>
		</template>
	</v-forms>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { detailDailyFormConfig, VForms } from '../config/form/index';
import staffAction from './staffAction.vue';
import useCurrentInstance from '/@/utils/hook/useCurrentInstance';
const { proxy } = useCurrentInstance();
const $t = proxy.$t;
let contractURL = ref(''); //附件地址
const formRef = ref();
const addNew = (data: any) => {
	//获取当前日期
	data.date = data.date.split(' ')[0];
	contractURL.value = data.pirturePath || '';
	let list: any = detailDailyFormConfig(data);
	formRef.value.openDialog(list, $t('8nOpqjwPtmVZIe41W6uP'));
};

defineExpose({
	formRef,
	addNew,
});
</script>
<scope lang="scss">
 //el-ui内部class使用:deep 修改属性样式
// :deep(.el-input.is-disabled .el-input__inner) {
// 		-webkit-text-fill-color: #030303;
// 	}
//如果是外层的class,直接使用.xx修改!!
.el-checkbox {
	font-size: 12px;
	font-weight: normal;
}
</scope>
